<template>
  <div class="main_box" style="padding:10px;">
    <div class="detail_wrap">
      <div class="tit">
        <h2>基础信息</h2>
        <el-button size="small" plain type="success" icon="fa fa-mail-forward" @click="returnList" > 返 回</el-button>
      </div>
      <div class="con">
        <ul>
          <li>
            <label class="label">项目名称:</label>
            <span>{{appointData.itemName}}</span>
          </li>
          <li>
            <label class="label">项目编号:</label>
            <span>{{appointData.itemCode}}</span>
          </li>
          <li>
            <label class="label">项目分类:</label>
            <span>{{appointData.firstClassifyName}}-{{appointData.classifyName}}</span>
          </li>
          <li>
            <label class="label">医检机构:</label>
            <span>{{appointData.institutionName}}</span>
          </li>
          <li>
            <label class="label">科室:</label>
            <span>{{appointData.insOfficeName}}</span>
          </li>
          <li>
            <label class="label">医检项目编号:</label>
            <span>{{appointData.insItemCode}}</span>
          </li>
          <li>
            <label class="label">项目价格:</label>
            <span>{{appointData.itemPrice}}</span>
          </li>
          <li>
            <label class="label">项目时长:</label>
            <span>{{appointData.itemTime}}</span>
          </li>
          <li>
            <label class="label">临床意义:</label>
            <span>{{appointData.itemMeaning}}</span>
          </li>
          <li>
            <label class="label">注意事项:</label>
            <span>{{appointData.itemNote}}</span>
          </li>
          <li>
            <label class="label">检测流程:</label>
            <span>{{appointData.itemProcess}}</span>
          </li>
          <li>
            <label class="label">创建时间:</label>
            <span>{{appointData.createDate}}</span>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
  import AppointItemApi from "@/api/appoint/appointItem";
  export default {
  data() {
    return {
      appointData: ""
    };
  },
  methods: {
    getData() {
      AppointItemApi.getAppointItemInfo({
        itemId: this.$route.query.id
      }).then(res => {
        this.appointData = res.data;
      });
    },
    formatDate(value) {
      return this.$Utils.formatDate(value, "yyyy-MM-dd");
    },
    formatState (cellValue) {
      if (cellValue === 0) {
        return '检测中'
      } else if (cellValue === 1) {
        return '已出报告'
      }
    },
    returnList() {
      this.$store.dispatch('delView', this.$route);
      this.$router.push({ path: '/appoint/itemManagement' })
    }
  },
  mounted() {
    this.getData();
  }
};
</script>
<style lang="scss" src="@/assets/css/views/Detail.scss" scope>
</style>
